package pyf.demo;

/**
 * @author pengyifeng
 * @version 1.0
 * @ClassName TestThreadDemo.java
 * @Description 线程创建方式1 继承Thread
 * @createTime 2021年07月26日 18:17:00
 */
public class TestThreadDemo01 extends Thread{

    @Override
    public void run() {
        for (int i = 0; i < 100; i++) {
            System.out.println("多线程运行:"+i);
        }
    }

    public static void main(String[] args) {

        //运行线程
        new TestThreadDemo01().start();
        //主线程
        for (int i = 0; i < 200; i++) {
            System.out.println("主线程运行:"+i);
        }
    }
}
